const { defineConfig } = require('@vue/cli-service')
const path = require('path')

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 3000,
    proxy: {
      '/api': {
        target: 'http://10.3.230.241:8080',
        changeOrigin: true,
      }
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src')
      }
    },
    // 处理 ResizeObserver 错误
    ignoreWarnings: [
      /ResizeObserver loop completed with undelivered notifications/,
      /ResizeObserver loop limit exceeded/
    ]
  }
})
